cmake_minimum_required(VERSION 3.9)
project(com_example_democ)

add_definitions(-DCURL_STATICLIB)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32 -Wl,--subsystem,windows,--kill-at")
set(CMAKE_CXX_STANDARD 11)
set(SOURCE_FILES library.cpp)
set(INC_DIR depends/include)
set(LIB_DIR depends/lib)

include_directories(${INC_DIR})

FIND_LIBRARY(CURL_LIB curl ${LIB_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(CQP_LIB cqp ${LIB_DIR} NO_DEFAULT_PATH)

link_libraries(${CURL_LIB} ${CQP_LIB})

add_library(com_example_democ SHARED ${SOURCE_FILES})
